using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FiltronASP.Modules.Abstracts;
using FiltronASP.Models;
using FiltronASP.Models.DAO;
using FiltronASP.Helpers.XmlHelper;
using FiltronASP.Models.DAO.Interfaces;

namespace FiltronASP.Modules
{
    public class languageNameModule : AbstractModule
    {
        public override string GenerateContent(FiltronASP.Models.Page page) {

            int languageId = Convert.ToInt32(page.language_id);
            ILanguageDAO LanguageDAO = new LanguageDAO();
            Language currentLanguage = LanguageDAO.FindByPK(languageId);
            if (currentLanguage != null) {
                return currentLanguage.language_name;
            }
            return String.Empty;
        }
    }
}
